package com.doublefish.doublefishrobot.ui.video.bean;

/**
 * 作者:dugaofeng on 2024/10/30 11:00
 */
public class VideoPlayerItemBean {

    public static final int DFAVPlayerItemLocal = 0;          //本地视频
    public static final int DFAVPlayerItemRemote = 1;         //网络视频
    public static final int DFAVPlayerItemDownloadAndPlay = 2; //（网络视频）边下边播

    private int AVPlayerItemType; //视频的类型
    private String videoCode;     //视频的code
    private String url;           //视频数据获取的地址
    private float time;           //视频总时长
    private long size;             //视频的总长度

//    private long cacheSize;        //已下载到本地的视频的长度（已缓存的）
   private int progress = 100; //视频缓存进度 0-100, 默认已下载完毕

    private VideoPlayerItemBean() {

    }

    public VideoPlayerItemBean(int AVPlayerItemType, String videoCode, String url, float time, long size) {
        this.AVPlayerItemType = AVPlayerItemType;
        this.videoCode = videoCode;
        this.url = url;
        this.time = time;
        this.size = size;
    }

    public void update(int AVPlayerItemType, String url) {
        this.AVPlayerItemType = AVPlayerItemType;
        this.url = url;
    }

    public int getAVPlayerItemType() {
        return AVPlayerItemType;
    }

    public String getVideoCode() {
        return videoCode;
    }

    public String getUrl() {
        return url;
    }

    public float getTime() {
        return time;
    }

    public long getSize() {
        return size;
    }

//    public long getCacheSize() {
//        return cacheSize;
//    }
//
//    public void setCacheSize(long cacheSize) {
//        this.cacheSize = cacheSize;
//    }

    public void setProgress(int progress) {
        this.progress = progress;
    }

    public int getProgress() {
        return progress;
    }
}
